class Facet < Remote
  class << self
    
    def email(folder_ids, asset_ids, to, subject, msg)
      post(:email, :to => to, :subject => subject, :msg => msg, :folders => folder_ids, :assets => asset_ids)
    end
    
    def download_url(folder_ids, asset_ids)
      url = URI.parse("#{site.to_s}/facets/download")
      params = []
      params << "token_key=#{Remote.token_key}"
      folder_ids.each do |folder_id|
        params << "folders[]=#{folder_id}"
      end
      asset_ids.each do |asset_id|
        params << "assets[]=#{asset_id}"
      end
      url.query = params.join('&')
      url.to_s
    end
    
  end
end